package com.ly.mpayment.persist.entity;

import java.util.Date;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;


/**
 * BusinessType entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="businesstype"

)

public class BusinessType  implements java.io.Serializable {


    // Fields

     private String busuuid;
     private Operators operatorsType;
     private String busCode;
     private String busname;
     private String status;
     private Date createtime;
     private String remark;

    // Constructors

    /** default constructor */
    public BusinessType() {
    }


    /** full constructor */
    public BusinessType(Operators operators, String busname, String status, Date createtime, String remark, Set<DownShopProduct> downShopProducts, Set<UpShopProduct> upShopPros) {
        this.operatorsType = operators;
        this.busname = busname;
        this.status = status;
        this.createtime = createtime;
        this.remark = remark;
//        this.downShopProducts = downShopProducts;
//        this.upShopPros = upShopPros;
    }


    // Property accessors
    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name="busuuid", unique=true, nullable=false, length=36)

    public String getBusuuid() {
        return this.busuuid;
    }

    public void setBusuuid(String busuuid) {
        this.busuuid = busuuid;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="operatoruid")

    public Operators getOperatorsType() {
        return this.operatorsType;
    }

    public void setOperatorsType(Operators operators) {
        this.operatorsType = operators;
    }


    @Column(name="buscode", length=20)
    public String getBusCode() {
		return busCode;
	}

	public void setBusCode(String busCode) {
		this.busCode = busCode;
	}


	@Column(name="busname", length=20)
    public String getBusname() {
        return this.busname;
    }

    public void setBusname(String busname) {
        this.busname = busname;
    }

    @Column(name="status", length=40)

    public String getStatus() {
        return this.status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Column(name="createtime", length=19)

    public Date getCreatetime() {
        return this.createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Column(name="remark", length=1000)

    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
//@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="businessType")
//
//    public Set<DownShopProduct> getDownShopProducts() {
//        return this.downShopProducts;
//    }
//
//    public void setDownShopProducts(Set<DownShopProduct> downShopProducts) {
//        this.downShopProducts = downShopProducts;
//    }
//@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="businessType")
//
//    public Set<UpShopPro> getUpShopPros() {
//        return this.upShopPros;
//    }
//
//    public void setUpShopPros(Set<UpShopPro> upShopPros) {
//        this.upShopPros = upShopPros;
//    }
//








}
